using System;
using System.Collections.Generic;
using System.Text;

namespace JBORPG.Net
{
    class Helper
    {
        public static String BytesToString(Byte[] data)
        {
            return System.Text.Encoding.UTF8.GetString(data).Replace("\x00", "").Trim();
        }

        public static Byte[] StringToBytes(String data)
        {
            return System.Text.Encoding.UTF8.GetBytes(data);
        }
    }
}
